package edu.sjsu.cs.queryopt.dbms.error;

/**
 * CS 286 - Project Part 2 - Implements Error Exception for DBMS.  
 * @author Tejaswini Karra
 * @version December 8, 2011
 */
public class CommandException extends Exception {
	
	String mistake;

	// Default constructor - initializes instance variable to unknown.
	public CommandException()
	{
		super(); 
		mistake = "unknown"; 
	}

	// Constructor receives a message.
	public CommandException(String err)
	{
	    super(err); 
	    mistake = err; 
	}
	  
	// Returns the error message.
	public String getError()
	{
		return mistake;
	}
}
